/*

 @name    : 锅巴汉化 - Web汉化插件
 @author  : 麦子、JAR、小蓝、好阳光的小锅巴
 @version : V0.6.1 - 2019-07-09
 @website : http://www.g8hh.com

*/

//1.汉化杂项
var cnItems = {
    _OTHER_: [],

    //未分类：
    'Save': '保存',
    'Export': '导出',
    'Import': '导入',
    'Settings': '设置',
    'Achievements': '成就',
    'Statistics': '统计',
    'Hard reset': '硬重置',
    'Inventory': '库存',
    'money': '钱',
    'Money': '钱',
    'Companies': '公司',
    'Adjust wristwatch': '调整手表',
    'Economics handbook': '经济学手册',
    'Expand forests': '扩大森林',
    'Grow your lemonade empire': '发展您的柠檬水帝国',
    'Increases max woodworks by 80.': '使最大木制品增加80。',
    'Market dominance': '市场支配地位',
    'Placeholder': '占位符',
    'Personal consultant': '个人顾问',
    'Time warp': '时间扭曲',
    'Frod': '舞弊',
    'Bank': '银行',
    'Golf courts': '高尔夫球场',
    'Horse cars inc.': '马车公司',
    'le Goog': '乐高',
    'Lemonade Co.': '柠檬水公司',
    'Local woodworks': '当地木制品',
    'NACA': '北美民航局',
    'Oil rigs': '石油钻井平台',
    'wood': '木头',
    'oil': '石油',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    'Produces money. And cars.': '产生钱。 和汽车。',
    'Your lemonade is going viral. Increase limit of lemonade stalls by 100 and Lemonade Co. by 30.': '您的柠檬水开始流行。 将柠檬水摊位的上限增加100，将柠檬水公司的上限增加30。',
    'Time to go global. Get access to the finest oil sources across the continent.': '是时候走向全球了。 获得整个大陆最好的石油来源。',
    'They say having these makes people give you money for free. Further improve sell value by 5': '他们说拥有这些使人们免费给您钱。 进一步提高销售价值5',
    'The largest oil enterprise in the world. Produces a lot of oil.': '世界上最大的石油企业。 产生大量的石油。',
    'Take advice from your well-educated consultant once in a while and sell everything 5% better.': '偶尔听取受过良好教育的顾问的建议，将所有产品销售提高5％。',
    'Some call this company l`Amghorbini, but they are really called just Horse cars.': '有人称这家公司为“ Amghorbini”，但实际上他们的名字叫“骑马”。',
    'Reduce interval between ticks to flopping 0.6 seconds.': '将tick之间的间隔减少到0.6秒。',
    'Not really useful for anything really, but people tend to pay a lot for it.': '并不是真的对任何东西有用，但是人们会为此付出很多。',
    'National Association for Cosmonauts and Astronauts earns a lot of money.': '全国宇航员协会赚了很多钱。',
    'Lets you change growth rate twice as fast.': '让您以两倍快的速度更改增长率。',
    'Lemonade Co. produces quite a lot of money and a lot of lemonade. Also, costs a lot.': '柠檬水公司生产大量的金钱和柠檬水。 另外，花费也很多。',
    'It is time to step up your game. Bank produces considerable amount of money by itself.': '现在该加强您的游戏了。 银行自己产生大量的钱。',
    'Increase max lemonade stalls by 15.': '最大柠檬水摊位增加15个。',
    'Improve sell value of all your companies and resources by 5': '将您所有公司和资源的销售价值提高5',
    'Change growth ratio to the edge value with a single click!': '只需单击一下，即可将增长率更改为边缘值！',
    'Buy a phone box': '买个电话亭',
    'Bend the time and space itself with the latest technological tweaks to phone boxes. Halve the interval between ticks to unbelievable 0.3 seconds.': '通过对电话亭进行最新的技术调整，可以弯曲时间和空间。将tick间隔减半到令人难以置信的0.3秒。',
    'Bags with dollar symbol': '有美元符号的包',
    'A huge french company which started of as a web search engine.': '一家大型法国公司，最初只是作为网络搜索引擎。',
    'A huge and very expensive mall somewhere in Europe. Gains money.': '欧洲某处巨大且非常昂贵的购物中心。 赚钱。',
    'lemonade': '柠檬水',
    'Whenever you hover an element, info about that will show here.': '每当您将元素悬停时，有关该元素的信息就会显示在此处。',
    'This is history of price of selected comodity. Green line is sell price, red line is buy price. Its speed of change and overall behavior varies from company to company.': '这是选定商品价格的历史记录。 绿线是卖出价格，红线是买入价格。 它的变化速度和整体行为因公司而异。',
    'Reduce interval between ticks by 10%.': '减少tick的间隔10%。',
    'Promote your lemonade': '促进你的柠檬水摊位',
    'Production': '生产',
    'Market advisor': '市场顾问',
    'Cost': '成本',
    'Click for graph!': '点击查看图表！',
    'A bit more expensive, a bit more earning, Local woodworks is perfect as the second company of your empire.': '贵一点，赚一点点，本地木制品是您帝国的第二家公司，是完美的选择。',
    'Upgrades': '升级',
    'This is status log. All sold and bought items are logged here, also with some tutorial and similar.': '这是状态日志。 所有售出和购买的物品都记录在这里，还包含一些教程和类似内容。',
    'Money can be used to buy most companies and upgrades. You can gain it by selling companies and resources or letting your companies generate it for you.': '钱可以用来购买大多数公司并进行升级。 您可以通过出售公司和资源或让您的公司为您创造收益来获得收益。',

    //原样
    'Hard Dos': 'Hard Dos',
    'Spinoegg': 'Spinoegg',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',

}


//需处理的前缀
var cnPrefix = {
    "(-": "(-",
    "(+": "(+",
    "(": "(",
    "-": "-",
    "+": "+",
    " ": " ",
    ": ": "： ",
    "\n": "",
    "                   ": "",
    "                  ": "",
    "                 ": "",
    "                ": "",
    "               ": "",
    "              ": "",
    "             ": "",
    "            ": "",
    "           ": "",
    "          ": "",
    "         ": "",
    "        ": "",
    "       ": "",
    "      ": "",
    "     ": "",
    "    ": "",
    "   ": "",
    "  ": "",
    " ": "",
    "Owned: ": "持有: ",
    "Price: ": "价格: ",
    "Max: ": "最大: ",
    "Unlock ": "解锁 ",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
}

//需处理的后缀
var cnPostfix = {
    ":": "：",
    "：": "：",
    ": ": "： ",
    "： ": "： ",
    "/s)": "/s)",
    "/s": "/s",
    ")": ")",
    "%": "%",
    "                   ": "",
    "                  ": "",
    "                 ": "",
    "                ": "",
    "               ": "",
    "              ": "",
    "             ": "",
    "            ": "",
    "           ": "",
    "          ": "",
    "         ": "",
    "        ": "",
    "       ": "",
    "      ": "",
    "     ": "",
    "    ": "",
    "   ": "",
    "  ": "",
    " ": " ",
    "\n": "",
    "Start off by buying some Lemonade stalls under Companies tab. They will generate some cash and lemonade, but more importantly, you can sell them for higher price than for which you bought them.": "首先在“公司”标签下购买一些柠檬水摊位。 它们会产生一些现金和柠檬水，但更重要的是，您可以以高于购买价格的价格出售它们。",
    "HEY! OVER HERE! Hello and welcome to Stock Market Simulator. This is status log, various messages and tutorial will show up here. Hover various elements to get help regarding them in the other corner of the screen": "嘿！ 在这里！ 您好，欢迎来到股市模拟器。 这是状态日志，各种消息和教程将在此处显示。 将鼠标悬停在屏幕的另一角以获取有关它们的帮助",
    "You cannot buy that": "你不能购买这个",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
}

//需排除的，正则匹配
var cnExcludeWhole = [
    /^([\d\.]+)$/,
    /^([\d\.]+)k$/,
];
var cnExcludePostfix = [
]

//正则替换，带数字的固定格式句子
//纯数字：(\d+)
//逗号：([\d\.,]+)
//小数点：([\d\.]+)
//原样输出的字段：(.+)
//换行加空格：\n(.+)
var cnRegReplace = new Map([
    [/^requires ([\d\.]+) more research points$/, '需要$1个研究点'],
    [/^\>(.+) \- Welcome back! You have been away for (.+) ticks \((.+) seconds$/, '\> $1 \- 欢迎回来！ 您已离开了 $2 tick（$3秒'],
    [/^\>(.+) \- (.+)x \'Lemonade stall\' bought for (.+)$/, '\> $1 \- 以 $3 的价格购买了 $2x \'柠檬水摊位\''],
    [/^\>(.+) \- (.+)x \'Lemonade Co.\' bought for (.+)$/, '\> $1 \- 以 $3 的价格购买了 $2x \'柠檬水公司\''],
    [/^\>(.+) \- (.+)x \'Bank\' bought for (.+)$/, '\> $1 \- 以 $3 的价格购买了 $2x \'银行\''],
    [/^\>(.+) \- (.+)x \'Local woodworks\' bought for (.+)$/, '\> $1 \- 以 $3 的价格购买了 $2x \'当地木制品\''],
    [/^\>(.+) \- (.+)x \'Lemonade stall\' bought for (.+) \((.+) each$/, '\> $1 \- 以 $3 的价格购买了 $2x \'柠檬水公司\' \(单价为 $4'],
    [/^\>(.+) \- (.+)x \'Oil rigs\' bought for (.+) \((.+) each$/, '\> $1 \- 以 $3 的价格购买了 $2x \'石油钻井平台\' \(单价为 $4'],
    [/^\>(.+) \- (.+)x \'Lemonade Co.\' bought for (.+) \((.+) each$/, '\> $1 \- 以 $3 的价格购买了 $2x \'柠檬水公司\' \(单价为 $4'],
    [/^\>(.+) \- (.+)x \'Lemonade stall\' sold for (.+) \((.+) each$/, '\> $1 \- 以 $3 的价格出售了 $2x \'柠檬水摊位\' \(单价为 $4'],
    [/^\>(.+) \- (.+)x \'lemonade\' sold for (.+) \((.+) each$/, '\> $1 \- 以 $3 的价格出售了 $2x \'柠檬水\' \(单价为 $4'],
    [/^\>(.+) \- (.+)x \'wood\' sold for (.+) \((.+) each$/, '\> $1 \- 以 $3 的价格出售了 $2x \'木头\' \(单价为 $4'],
    [/^\>(.+) \- (.+)x \'oil\' sold for (.+) \((.+) each$/, '\> $1 \- 以 $3 的价格出售了 $2x \'石油\' \(单价为 $4'],
    [/^\>(.+) \- (.+)x \'Local woodworks\' sold for (.+)$/, '\> $1 \- 以 $3 的价格出售了 $2x \'当地木制品\''],
    [/^\>(.+) \- (.+)x \'Lemonade Co.\' sold for (.+)$/, '\> $1 \- 以 $3 的价格出售了 $2x \'柠檬水公司\''],
    [/^\>(.+) \- (.+)x \'Lemonade stall\' sold for (.+)$/, '\> $1 \- 以 $3 的价格出售了 $2x \'柠檬水摊位\''],
    [/^\>(.+) \- (.+)x \'Bank\' sold for (.+)$/, '\> $1 \- 以 $3 的价格出售了 $2x \'银行\''],
    [/^\>(.+) \- (.+)x \'Oil rigs\' sold for (.+)$/, '\> $1 \- 以 $3 的价格出售了 $2x \'石油钻井平台\''],
    [/^Cost: (\d+) RP$/, '成本：$1 皇家点数'],
    [/^Usages: (\d+)\/$/, '用途：$1\/'],
    [/^workers: (\d+)\/$/, '工人：$1\/'],

]);